package com.system.business.service;

import com.system.business.domain.DailyTrainSeat;
import com.baomidou.mybatisplus.extension.service.IService;
import com.system.business.req.DailyTrainSeatQueryReq;
import com.system.business.req.DailyTrainSeatSaveReq;
import com.system.business.resp.DailyTrainSeatQueryResp;
import com.system.common.resp.PageResp;
import org.springframework.transaction.annotation.Transactional;

import java.util.Date;
import java.util.List;

/**
* @author Admin
* @description 针对表【daily_train_seat(每日座位)】的数据库操作Service
* @createDate 2024-03-21 15:02:15
*/
public interface DailyTrainSeatService extends IService<DailyTrainSeat> {

    void save(DailyTrainSeatSaveReq req);

    PageResp<DailyTrainSeatQueryResp> queryList(DailyTrainSeatQueryReq req);

    @Transactional
    void genDaily(Date date, String trainCode);

    int countSeat(Date date, String trainCode, String code);

    List<DailyTrainSeat> selectByCarriage(Date date, String trainCode, Integer indexCode);

    DailyTrainSeat selectByNotSell(Date date, String trainCode, String seatType);
}
